﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.ActiveRecord;
using System.Collections;

namespace Windvoice.Blog
{
    public partial class Category : ActiveRecordBase<Category>
    {
        public static Category Get(string uniqueKey)
        {
            var query = from c in FindAll() where c.UniqueKey == uniqueKey select c;
            return query.Count() == 1 ? FindAll().Where(a => a.UniqueKey == uniqueKey).Single() : null;
        }
    }
}
